<?php

namespace App\Game\Conf;

/**
 *子命令字定义，h5客户端也应有一份对应配置，REQ结尾一般是客户端请求过来的子命令字， RESP服务器返回给客户端处理子命令字
 */
class SubCmd
{
    //系统子命令字，对应MainCmd.CMD_SYS
    const LOGIN_FAIL_RESP = 100;                    //登陆失败消息下发命
    const LOGIN_SUCCESS_RESP = 105;                 //登陆成功消息下发命
    const HEART_ASK_REQ = 101;                      //心跳请求处理后下发
    const HEART_ASK_RESP = 102;                     //心跳请求响应处理（响应需要编写对应的路由处理逻辑）
    const BROADCAST_MSG_REQ = 103;                  //系统广播消息请求
    const BROADCAST_MSG_RESP = 104;                 //系统广播消息请求
    const ENTER_ROOM_FAIL_RESP = 106;               //进入房间失败协议
    const ENTER_ROOM_SUCC_RESP = 107;               //进入房间成功协议
    const SUB_GAME_HALL_RESP = 108;                 //进入游戏大厅成功协议
    const SUB_GAME_ROOM_CREATE_RESP = 109;          //进入游戏大厅成功协议
    const SUB_GAME_JOIN_RESP = 110;                 //加入游戏房间成功发牌协议
    const SUB_USER_IN_GAME = 111;                   //检查用户正在进行游戏返回
    const SUB_GAME_WAIT = 112;                      //键入房间返回等待
    const SUB_GAME_JOIN_FULL = 113;                 //加入游戏房间人满了
    const SUB_GAME_PULL_RESP = 114;                 //将用户拉进正在进行的游戏房间--返回
    const SUB_GAME_PREPARE_RESP = 115;              // 准备游戏返回
    const SUB_GAME_CHANGE_OVER_RESP = 116;          // 游戏换牌结束返回
    const SUB_GAME_CHOOSE_OVER_RESP = 117;          // 游戏定缺结束返回
    const SUB_GAME_PENG_OVER_RESP = 118;            // 游戏碰牌结束返回
    const SUB_GAME_GANG_OVER_RESP = 119;            // 游戏杠牌结束返回
    const SUB_GAME_ROOM_QUIT_RESP = 120;            // 退出游戏房间--返回
    const SUB_GAME_CALL_LOOP_RESP = 121;            // 叫牌计时循环返回
    const SUB_GAME_OUT_CARD_LOOP_RESP = 122;        // 循环下发下家出牌信息
    const SUB_GAME_OVER_SHOW_SCORE_RESP = 123;      // 游戏结束分数信息
    const SUB_GAME_LEFT_CARDS_RESP = 124;           // 游戏玩家剩余手牌
    const SUB_GAME_PREPARE_AGAIN_RESP = 125;        // 通知重新准备
    const SUB_GAME_ASSIGN_AGAIN_RESP = 126;         // 重新发牌三次通知
    const SUB_GAME_TAKE_OVER = 127;                 // 通过状态消息推送
    const SUB_GAME_BACK_RESP = 128;                 // 重回游戏消息推送

    const SUB_GAME_CHECK_HU_PENG_GANG = 129;        // 检查胡碰杠
    const SUB_GAME_START_HUAN_PAI = 130;            // 开始换牌
    const SUB_GAME_START_CHOOSE_COLOR = 131;        // 开始定缺
    const SUB_GAME_SEND_CARD = 132;               // 开始发牌
    const SUB_GAME_OUT_CARD = 133;               // 开始出牌
    const SUB_GAME_CACULAR = 134;               // 结算
    const SUB_GAME_PIAO_SCORE = 135;               // 飘分

    const GAME_QUICK_RESP = 136;                // 大奖赛快速开始消息返回
    const GAME_QUICK_MATCH = 137;               // 大奖赛快速开始匹配返回
    const GAME_DJS_OVER = 138;                  // 大奖赛对局结束，返回
    const GAME_DJS_PULL_RESP = 139;             // 大奖赛拉进游戏返回

    const GAME_CHANGE_ROOM_RESP = 140;             // 换房


    //游戏逻辑子命令字,对应MainCmd.CMD_GAME
    const SUB_GAME_START_REQ = 1;                   //游戏开始---> CGameStart
    const SUB_GAME_START_RESP = 2;                  //游戏场景---> CGameScence
    const SUB_USER_INFO_RESP = 3;                   //用户信息 ------> CUserInfo
    const SUB_GAME_SEND_CARD_RESP = 4;              //发牌 ------> CGameSendCard
    const SUB_GAME_CHANG_CARD_REQ = 5;              //换牌请求   --> CGameChangeReq
    const SUB_GAME_CHANG_CARD_RESP = 6;             //换牌返回   --> CGameChange
    const SUB_GAME_CHOOSE_COLOR_REQ = 7;            //定缺请求   --> CGameChooseColorReq
    const SUB_GAME_CHOOSE_COLOR_RESP = 8;           //定缺返回   --> CGameChooseColor
    const SUB_GAME_CATCH_CARD_REQ = 9;              //摸牌请求 ---> CGameCatchCardREQ
    const SUB_GAME_CATCH_CARD_RESP = 10;            //摸牌返回 ---> CGameCatchCard
    const SUB_GAME_OUT_CARD_REQ = 11;                //出牌请求 --> CGameOutCard
    const SUB_GAME_OUT_CARD_RESP = 12;               //出牌返回 --> CGameOutCardReq
    const SUB_GAME_PENG_CARD_REQ = 13;              //碰牌请求 --> CGamePengCardReq
    const SUB_GAME_PENG_CARD_RESP = 14;             //碰牌返回 --> CGamePengCard
    const SUB_GAME_GANG_CARD_REQ = 15;              //杠牌请求 --> CGameGangCardReq
    const SUB_GAME_GANG_CARD_RESP = 16;             //杠牌返回 --> CGameGangCardReq
    const SUB_GAME_HU_CARD_REQ = 17;                //胡牌请求 --> CGameHuCardReq
    const SUB_GAME_HU_CARD_RESP = 18;               //胡牌返回 --> CGameHuCardReq
//    const SUB_GAME_CACULAR = 19;                //结算请求 --> CGameHuCard
//    const SUB_GAME_CACULAR_RESP = 20;               //结算返回 --> CGameHuCardReq

    const SUB_GAME_HALL = 20;                       // 进入游戏大厅
    const SUB_GAME_ROOM_CREATE = 21;                // 创建房间
    const SUB_GAME_JOIN = 22;                       // 加入游戏
    const SUB_GAME_PULL = 23;                       // 将用户拉进正在进行的游戏房间
    const SUB_GAME_PREPARE = 24;                    // 游戏准备消息
    const SUB_GAME_ROOM_QUIT = 25;                  // 退出游戏房间
    const GAME_ROOM_ONE_MORE = 26;                  // 游戏房间再来一局
    const GAME_TAKE_OVER_USER = 27;                 // 游戏玩家接管、取消接口

    const GAME_DJS_QUICK = 28;                  // 大奖赛快速开始
    const GAME_DJS_PULL  = 29;                  // 大奖赛重连拉入

    const GAME_CHANGE_ROOM  = 30;                  // 换房

    const CHAT_MSG_REQ = 200;                       //聊天消息请求，客户端使用
    const CHAT_MSG_RESP = 201;                      //聊天消息响应，服务端使用

    const FORCE_QUIT_ROOM_RESP = 249;                      //强制退出


}